iT邦幫忙

0

[PowerCenter] pmcmd -啟動&停止

  • 分享至 

  • xImage
  •  

Informatica PowerCenter
版本 : 8.6.1 HotFix10

stop
pmcmd stopworkflow -sv is_name -d Domain_name -u user_id -p password -f "folder_name" -wait wf_name

啟動workflow
pmcmd startworkflow -sv is_name -d Domain_name -u user_id -p password -f "folder_name" -wait wf_name

啟動session

PMCMD starttask -sv Integration_Service_Name -d Domain_Name -u User_Name -p Password -f "Folder_name" -w Workflow_Name Session_Name -wait

ScheduleWorkflow

PMCMD ScheduleWorkflow -sv Integration_Service_Name -d Domain_Name -u User_Name -p Password -f "Folder_name" -w Workflow_Name Session_Name -wait

把這些語法,放在run.bat


getworkflowdetails

wf detail就會輸出存在我們指定E:\test\xx.log的檔案裡

PMCMD getworkflowdetails -sv Integration_Service_Name -d Domain_Name -u User_Name -p Password -f "Folder_name" Workflow_Name > E:\test\xx.log

pause

starttask

一個一個點很麻煩,寫成bat按一下就好
-wait 第二行,會等第一行執行完才會跑

PMCMD starttask -sv Integration_Service_Name -d Domain_Name -u User_Name -p Password -f "Folder_name" -w Workflow_Name Session_Name -wait

pause

另一種寫法,拆2個檔案(變數+執行檔)

變數檔E:\test\PC_Login.cmd

SET Service=Integration_Service_Name
SET Domain=Domain_Name
SET User=User_Name
SET Password=Password
SET temp=E:\test\
 
REM *** Set FolderName and WorkflowName ***
SET s1="Folder_name"
SET s2=Workflow_Name

執行檔run.bat

@ECHO OFF 
REM *******************************************************
REM * File   :  
REM *
REM * This script starts a workflow and checks for run status.
REM * 輸入兩組參數 Folder名稱以及 Workflow名稱
REM *
REM *******************************************************
REM *** Get variables from PC_Login.cmd ***

CALL E:\test\PC_Login.cmd
SET Service=%Service%
SET Domain=%Domain%
SET User=%User%
SET Password=%Password%
SET temp=%temp%
REM *** Set FolderName and WorkflowName ***
SET Folder=%s1%
SET Workflow=%s2%


REM *** Start Workflow and wait till workflow completes ***
PMCMD startworkflow -sv %Service% -d %Domain% -u %User% -p %Password% -f %Folder% -wait %Workflow%

 
REM *** Return the information about a workflow in a tmp file ***
PMCMD getworkflowdetails -sv %Service% -d %Domain% -u %User% -p %Password% -f %Folder% %Workflow% > %temp%%Folder%.%Workflow%.log

REM echo %Service%
REM echo %Domain%
REM echo %User%
REM echo %Password%
REM echo %temp%
REM echo %s1%
REM echo %s2%
 

pause

ref
http://idwbi.com/pmcmd-commands-in-informatica/


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言